package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(100)"`
	Password string `gorm:"type:varchar(100)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(100)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(100)"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Orders struct {
	gorm.Model
	OrderName    string `gorm:"type:varchar(100)"`
	OrderContent string `gorm:"type:varchar(100)"`
	OrderPrice   int    `gorm:"type:int"`
	Pid          int    `gorm:"type:int"`
}

type Repo struct {
	gorm.Model
	RepoName    string `gorm:"type:varchar(100)"`
	RepoContent string `gorm:"type:varchar(100)"`
}

type OrdersRepo struct {
	ID           string
	OrderName    string
	OrderContent string
	OrderPrice   int
	RepoName     string
	RepoContent  string
}
